const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const mongoosePaginate = require('mongoose-paginate');
const ObjectId = Schema.ObjectId;


//设置新闻 标题 title、内容 content、tree的ID、及当前日期
var UploadSchema = new mongoose.Schema({
	fieldname:String,
	originalname:String,
	encoding:String,
	mimetype:String,
	destination:String,
	filename:String,
	path:String,
	size:Number
});
// 将数据模型应用分页插件
UploadSchema.plugin(mongoosePaginate);

module.exports = mongoose.model('Upload', UploadSchema,'upload');